function rest=srcf(n,term)

unimesh=(0:1/n:1)';
% h=1/n;
% 
% f{term}=1;
% f{1}=-x.*sin(x)   +cos(x);
% f{2}=-2*x.*sin(x) +cos(x);

switch term
    case 1
%         f0=@(x) -x.*sin(x)   +cos(x);
%         f1=@(x) -2*x.*sin(x) +cos(x);
f0=@(x)-7*x.*sin(x) +3*cos(x);
       
        tmp1=f0(unimesh(2:n));



        %1st equation
        [bdcorL,bdcorR]= bdcorrector(1,n,1);
        tmp1(1)  = tmp1(1)  + bdcorL;
        tmp1(n-1)= tmp1(n-1)+ bdcorR;

        
        rest=tmp1;
    case 2
%                 f0=@(x) -x.*sin(x)   +cos(x)   +x.*exp(-x) -exp(-x)     ;
%         f1=@(x) -2*x.*sin(x) +cos(x)   +x.*exp(-x) -2*exp(-x) ;
f0=@(x)-7*x.*sin(x) +3*cos(x)+ 6*x.*exp(-x) -2*exp(-x);
f1=@(x)-6*x.*sin(x) +2*cos(x)+5*x.*exp(-x) -exp(-x);
       
        tmp1=f0(unimesh(2:n));
        tmp2=f1(unimesh(2:n));


        %1st equation
        [bdcorL,bdcorR]= bdcorrector(1,n,2);
        tmp1(1)  = tmp1(1)  + bdcorL;
        tmp1(n-1)= tmp1(n-1)+ bdcorR;

        %2nd equation
        [bdcorL,bdcorR]= bdcorrector(2,n,2);
        tmp2(1)  = tmp2(1)  + bdcorL;
        tmp2(n-1)= tmp2(n-1)+ bdcorR;

        
        rest=[tmp1;tmp2];
    case 3
        f0=@(x) -x.*sin(x)   +cos(x)   +x.*exp(-x) -exp(-x)   -2*x.*cos(x) -sin(x)   ;
        f1=@(x) -2*x.*sin(x) +cos(x)   +x.*exp(-x) -2*exp(-x) -x.*cos(x)   -2*sin(x) ;
        f2=@(x) -3*x.*sin(x) +2*cos(x) +x.*exp(-x) -exp(-x)   -3*x.*cos(x) -sin(x)   ;
%        f0=@(x)-7*x.*sin(x) +3*cos(x)+ 6*x.*exp(-x) -2*exp(-x) -5*x.*cos(x) -sin(x);
% f1=@(x)-6*x.*sin(x) +2*cos(x)+5*x.*exp(-x) -exp(-x) -4*x.*cos(x)   -4*sin(x);
% f2=@(x)-5*x.*sin(x) +cos(x)+ 4*x.*exp(-x) -4*exp(-x) -3*x.*cos(x) -3*sin(x);
        tmp1=f0(unimesh(2:n));
        tmp2=f1(unimesh(2:n));
        tmp3=f2(unimesh(2:n));

        %1st equation
        [bdcorL,bdcorR]= bdcorrector(1,n,3);
        tmp1(1)  = tmp1(1)  + bdcorL;
        tmp1(n-1)= tmp1(n-1)+ bdcorR;

        %2nd equation
        [bdcorL,bdcorR]= bdcorrector(2,n,3);
        tmp2(1)  = tmp2(1)  + bdcorL;
        tmp2(n-1)= tmp2(n-1)+ bdcorR;

        %3rd equation
        [bdcorL,bdcorR]= bdcorrector(3,n,3);
        tmp3(1)  = tmp3(1)  + bdcorL;
        tmp3(n-1)= tmp3(n-1)+ bdcorR;

        rest=[tmp1;tmp2;tmp3];
    case 4
%         f0=@(x) -x.*sin(x)   +cos(x)   +x.*exp(-x) -exp(-x)   -2*x.*cos(x) -sin(x)   +3*x.*exp(x) +exp(x);
%         f1=@(x) -2*x.*sin(x) +cos(x)   +x.*exp(-x) -2*exp(-x) -x.*cos(x)   -2*sin(x) +3*x.*exp(x) +exp(x);
%         f2=@(x) -3*x.*sin(x) +2*cos(x) +x.*exp(-x) -exp(-x)   -3*x.*cos(x) -sin(x)   +3*x.*exp(x) +2*exp(x);
%         f3=@(x) -2*x.*sin(x) +2*cos(x) +x.*exp(-x) -exp(-x)   -2*x.*cos(x) -2*sin(x) +2*x.*exp(x) +3*exp(x);
%         
f0=@(x)-7*x.*sin(x) +3*cos(x)+ 6*x.*exp(-x) -2*exp(-x) -5*x.*cos(x) -sin(x)+4*x.*exp(x) +4*exp(x);
f1=@(x)-6*x.*sin(x) +2*cos(x)+5*x.*exp(-x) -exp(-x) -4*x.*cos(x)   -4*sin(x)+3*x.*exp(x) +3*exp(x);
f2=@(x)-5*x.*sin(x) +cos(x)+ 4*x.*exp(-x) -4*exp(-x) -3*x.*cos(x) -3*sin(x)+2*x.*exp(x) +2*exp(x);
f3=@(x)-4*x.*sin(x) +4*cos(x)+ 3*x.*exp(-x) -3*exp(-x) -2*x.*cos(x) -2*sin(x)+x.*exp(x) +exp(x);
%        
        tmp1=f0(unimesh(2:n));
        tmp2=f1(unimesh(2:n));
        tmp3=f2(unimesh(2:n));
        tmp4=f3(unimesh(2:n));

        %1st equation
        [bdcorL,bdcorR]= bdcorrector(1,n,4);
        tmp1(1)  = tmp1(1)  + bdcorL;
        tmp1(n-1)= tmp1(n-1)+ bdcorR;

        %2nd equation
        [bdcorL,bdcorR]= bdcorrector(2,n,4);
        tmp2(1)  = tmp2(1)  + bdcorL;
        tmp2(n-1)= tmp2(n-1)+ bdcorR;

        %3rd equation
        [bdcorL,bdcorR]= bdcorrector(3,n,4);
        tmp3(1)  = tmp3(1)  + bdcorL;
        tmp3(n-1)= tmp3(n-1)+ bdcorR;

        %4th equation
        [bdcorL,bdcorR]= bdcorrector(4,n,4);
        tmp4(1)  = tmp4(1)  + bdcorL;
        tmp4(n-1)= tmp4(n-1)+ bdcorR;
        
        rest=[tmp1;tmp2;tmp3;tmp4];
end